package com.woniu.register.controller;


import com.woniu.common.util.Result;
import com.woniu.common.util.ResultVO;
import com.woniu.register.VO.RoomVo;
import com.woniu.register.dto.RoomDTO;
import com.woniu.register.service.RoomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;

/**
 * @author ：zhuboyuan
 * @date ：Created in 2022/12/15 11:57
 * @description：c{description}
 * @modified By：
 * @version: $
 */
@RestController
@RequestMapping("rooms")
public class RoomController {
    @Autowired
    private RoomService roomService;

    @PostMapping("selectAll2")
    public Result selectAll(@RequestBody RoomDTO roomDTO){

        RoomVo room = roomService.selectAll(roomDTO);
        return Result.ok().data("rooms",room);
    }
}
